package org.admanager.simplifiedsca.plugin.simplifiedsca.diagram.edit.policies;

import org.admanager.simplifiedsca.plugin.simplifiedsca.diagram.edit.commands.ComponentReferenceCreateCommand;
import org.admanager.simplifiedsca.plugin.simplifiedsca.diagram.edit.commands.ComponentServiceCreateCommand;
import org.admanager.simplifiedsca.plugin.simplifiedsca.diagram.providers.SimplifiedSCAElementTypes;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

/**
 * @generated
 */
public class ComponentComponentCompartmentItemSemanticEditPolicy extends
		SimplifiedSCABaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public ComponentComponentCompartmentItemSemanticEditPolicy() {
		super(SimplifiedSCAElementTypes.Component_3001);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (SimplifiedSCAElementTypes.ComponentReference_3002 == req
				.getElementType()) {
			return getGEFWrapper(new ComponentReferenceCreateCommand(req));
		}
		if (SimplifiedSCAElementTypes.ComponentService_3003 == req
				.getElementType()) {
			return getGEFWrapper(new ComponentServiceCreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
